/**
 * Created by mxk on 2017/6/1.
 */
var CountryDataAry=[{id:1,name:'中国',code:'CHINA'},
    {id:2,name:'阿尔巴尼亚',code:'ALB'},
    {id:3,name:'阿尔及利亚',code:'DZA'},
    {id:4,name:'阿富汗',code:'AFG'},
    {id:5,name:'阿根廷',code:'ARG'},
    {id:6,name:'阿拉伯联合酋长国',code:'ARE'},
    {id:7,name:'阿鲁巴',code:'ABW'},
    {id:8,name:'阿曼',code:'OMN'},
    {id:9,name:'阿塞拜疆',code:'AZE'},
    {id:10,name:'阿森松岛',code:'ASC'},
    {id:11,name:'埃及',code:'EGY'},
    {id:12,name:'埃塞俄比亚',code:'ETH'},
    {id:13,name:'爱尔兰',code:'IRL'},
    {id:14,name:'爱沙尼亚',code:'EST'},
    {id:15,name:'安道尔',code:'AND'},
    {id:16,name:'安哥拉',code:'AGO'},
    {id:17,name:'安圭拉',code:'AIA'},
    {id:18,name:'安提瓜岛和巴布达',code:'ATG'},
    {id:19,name:'奥地利',code:'AUT'},
    {id:20,name:'奥兰群岛',code:'ALA'},
    {id:21,name:'澳大利亚',code:'AUS'},
    {id:22,name:'巴巴多斯岛',code:'BRB'},
    {id:23,name:'巴布亚新几内亚',code:'PNG'},
    {id:24,name:'巴哈马',code:'BHS'},
    {id:25,name:'巴基斯坦',code:'PAK'},
    {id:26,name:'巴拉圭',code:'PRY'},
    {id:27,name:'巴勒斯坦',code:'PSE'},
    {id:28,name:'巴林',code:'BHR'},
    {id:29,name:'巴拿马',code:'PAN'},
    {id:30,name:'巴西',code:'BRA'},
    {id:31,name:'白俄罗斯',code:'BLR'},
    {id:32,name:'百慕大',code:'BMU'},
    {id:33,name:'保加利亚',code:'BGR'},
    {id:34,name:'北马里亚纳群岛',code:'MNP'},
    {id:35,name:'贝宁',code:'BEN'},
    {id:36,name:'比利时',code:'BEL'},
    {id:37,name:'冰岛',code:'ISL'},
    {id:38,name:'波多黎各',code:'PRI'},
    {id:39,name:'波兰',code:'POL'},
    {id:40,name:'波斯尼亚和黑塞哥维那',code:'BIH'},
    {id:41,name:'玻利维亚',code:'BOL'},
    {id:42,name:'伯利兹',code:'BLZ'},
    {id:43,name:'博茨瓦纳',code:'BWA'},
    {id:44,name:'不丹',code:'BTN'},
    {id:45,name:'布基纳法索',code:'BFA'},
    {id:46,name:'布隆迪',code:'BDI'},
    {id:47,name:'布韦岛',code:'BVT'},
    {id:48,name:'朝鲜',code:'PRK'},
    {id:49,name:'丹麦',code:'DNK'},
    {id:50,name:'德国',code:'DEU'},
    {id:51,name:'东帝汶',code:'TLS'},
    {id:52,name:'多哥',code:'TGO'},
    {id:53,name:'多米尼加',code:'DMA'},
    {id:54,name:'多米尼加共和国',code:'DOM'},
    {id:55,name:'俄罗斯',code:'RUS'},
    {id:56,name:'厄瓜多尔',code:'ECU'},
    {id:57,name:'厄立特里亚',code:'ERI'},
    {id:58,name:'法国',code:'FRA'},
    {id:59,name:'法罗群岛',code:'FRO'},
    {id:60,name:'法属波利尼西亚',code:'PYF'},
    {id:61,name:'法属圭亚那',code:'GUF'},
    {id:62,name:'法属南部领地',code:'ATF'},
    {id:63,name:'梵蒂冈',code:'VAT'},
    {id:64,name:'菲律宾',code:'PHL'},
    {id:65,name:'斐济',code:'FJI'},
    {id:66,name:'芬兰',code:'FIN'},
    {id:67,name:'佛得角',code:'CPV'},
    {id:68,name:'弗兰克群岛',code:'FLK'},
    {id:69,name:'冈比亚',code:'GMB'},
    {id:70,name:'刚果',code:'COG'},
    {id:71,name:'刚果民主共和国',code:'COD'},
    {id:72,name:'哥伦比亚',code:'COL'},
    {id:73,name:'哥斯达黎加',code:'CRI'},
    {id:74,name:'格恩西岛',code:'GGY'},
    {id:75,name:'格林纳达',code:'GRD'},
    {id:76,name:'格陵兰',code:'GRL'},
    {id:77,name:'古巴',code:'CUB'},
    {id:78,name:'瓜德罗普',code:'GLP'},
    {id:79,name:'关岛',code:'GUM'},
    {id:80,name:'圭亚那',code:'GUY'},
    {id:81,name:'哈萨克斯坦',code:'KAZ'},
    {id:82,name:'海地',code:'HTI'},
    {id:83,name:'韩国',code:'KOR'},
    {id:84,name:'荷兰',code:'NLD'},
    {id:85,name:'荷属安地列斯',code:'ANT'},
    {id:86,name:'赫德和麦克唐纳群岛',code:'HMD'},
    {id:87,name:'洪都拉斯',code:'HND'},
    {id:88,name:'基里巴斯',code:'KIR'},
    {id:89,name:'吉布提',code:'DJI'},
    {id:90,name:'吉尔吉斯斯坦',code:'KGZ'},
    {id:91,name:'几内亚',code:'GIN'},
    {id:92,name:'几内亚比绍',code:'GNB'},
    {id:93,name:'加拿大',code:'CAN'},
    {id:94,name:'加纳',code:'GHA'},
    {id:95,name:'加蓬',code:'GAB'},
    {id:96,name:'柬埔寨',code:'KHM'},
    {id:97,name:'捷克共和国',code:'CZE'},
    {id:98,name:'津巴布韦',code:'ZWE'},
    {id:99,name:'喀麦隆',code:'CMR'},
    {id:100,name:'卡塔尔',code:'QAT'},
    {id:101,name:'开曼群岛',code:'CYM'},
    {id:102,name:'科科斯群岛',code:'CCK'},
    {id:103,name:'科摩罗',code:'COM'},
    {id:104,name:'科特迪瓦',code:'CIV'},
    {id:105,name:'科威特',code:'KWT'},
    {id:106,name:'克罗地亚',code:'HRV'},
    {id:107,name:'肯尼亚',code:'KEN'},
    {id:108,name:'库克群岛',code:'COK'},
    {id:109,name:'拉脱维亚',code:'LVA'},
    {id:110,name:'莱索托',code:'LSO'},
    {id:111,name:'老挝',code:'LAO'},
    {id:112,name:'黎巴嫩',code:'LBN'},
    {id:113,name:'立陶宛',code:'LTU'},
    {id:114,name:'利比里亚',code:'LBR'},
    {id:115,name:'利比亚',code:'LBY'},
    {id:116,name:'列支敦士登',code:'LIE'},
    {id:117,name:'留尼旺岛',code:'REU'},
    {id:118,name:'卢森堡',code:'LUX'},
    {id:119,name:'卢旺达',code:'RWA'},
    {id:120,name:'罗马尼亚',code:'ROU'},
    {id:121,name:'马达加斯加',code:'MDG'},
    {id:122,name:'马尔代夫',code:'MDV'},
    {id:123,name:'马耳他',code:'MLT'},
    {id:124,name:'马拉维',code:'MWI'},
    {id:125,name:'马来西亚',code:'MYS'},
    {id:126,name:'马里',code:'MLI'},
    {id:127,name:'马其顿',code:'MKD'},
    {id:128,name:'马绍尔群岛',code:'MHL'},
    {id:129,name:'马提尼克',code:'MTQ'},
    {id:130,name:'马约特岛',code:'MYT'},
    {id:131,name:'曼岛',code:'IMN'},
    {id:132,name:'毛里求斯',code:'MUS'},
    {id:133,name:'毛里塔尼亚',code:'MRT'},
    {id:134,name:'美国',code:'USA'},
    {id:135,name:'美属萨摩亚',code:'ASM'},
    {id:136,name:'美属外岛',code:'UMI'},
    {id:137,name:'蒙古',code:'MNG'},
    {id:138,name:'蒙特塞拉特',code:'MSR'},
    {id:139,name:'孟加拉',code:'BGD'},
    {id:140,name:'秘鲁',code:'PER'},
    {id:141,name:'密克罗尼西亚',code:'FSM'},
    {id:142,name:'缅甸',code:'MMR'},
    {id:143,name:'摩尔多瓦',code:'MDA'},
    {id:144,name:'摩洛哥',code:'MAR'},
    {id:145,name:'摩纳哥',code:'MCO'},
    {id:146,name:'莫桑比克',code:'MOZ'},
    {id:147,name:'墨西哥',code:'MEX'},
    {id:148,name:'纳米比亚',code:'NAM'},
    {id:149,name:'南非',code:'ZAF'},
    {id:150,name:'南极洲',code:'ATA'},
    {id:151,name:'南乔治亚和南桑德威奇群岛',code:'SGS'},
    {id:152,name:'瑙鲁',code:'NRU'},
    {id:153,name:'尼泊尔',code:'NPL'},
    {id:154,name:'尼加拉瓜',code:'NIC'},
    {id:155,name:'尼日尔',code:'NER'},
    {id:156,name:'尼日利亚',code:'NGA'},
    {id:157,name:'纽埃',code:'NIU'},
    {id:158,name:'挪威',code:'f_idR'},
    {id:159,name:'诺福克',code:'NFK'},
    {id:160,name:'帕劳群岛',code:'PLW'},
    {id:161,name:'皮特凯恩',code:'PCN'},
    {id:162,name:'葡萄牙',code:'PRT'},
    {id:163,name:'乔治亚',code:'GEO'},
    {id:164,name:'日本',code:'JPN'},
    {id:165,name:'瑞典',code:'SWE'},
    {id:166,name:'瑞士',code:'CHE'},
    {id:167,name:'萨尔瓦多',code:'SLV'},
    {id:168,name:'萨摩亚',code:'WSM'},
    {id:169,name:'塞尔维亚,黑山',code:'SCG'},
    {id:170,name:'塞拉利昂',code:'SLE'},
    {id:171,name:'塞内加尔',code:'SEN'},
    {id:172,name:'塞浦路斯',code:'CYP'},
    {id:173,name:'塞舌尔',code:'SYC'},
    {id:174,name:'沙特阿拉伯',code:'SAU'},
    {id:175,name:'圣诞岛',code:'CXR'},
    {id:176,name:'圣多美和普林西比',code:'STP'},
    {id:177,name:'圣赫勒拿',code:'SHN'},
    {id:178,name:'圣基茨和尼维斯',code:'KNA'},
    {id:179,name:'圣卢西亚',code:'LCA'},
    {id:180,name:'圣马力诺',code:'SMR'},
    {id:181,name:'圣皮埃尔和米克隆群岛',code:'SPM'},
    {id:182,name:'圣文森特和格林纳丁斯',code:'VCT'},
    {id:183,name:'斯里兰卡',code:'LKA'},
    {id:184,name:'斯洛伐克',code:'SVK'},
    {id:185,name:'斯洛文尼亚',code:'SVN'},
    {id:186,name:'斯瓦尔巴和扬马廷',code:'SJM'},
    {id:187,name:'斯威士兰',code:'SWZ'},
    {id:188,name:'苏丹',code:'SDN'},
    {id:189,name:'苏里南',code:'SUR'},
    {id:190,name:'所罗门群岛',code:'SLB'},
    {id:191,name:'索马里',code:'SOM'},
    {id:192,name:'塔吉克斯坦',code:'TJK'},
    {id:193,name:'泰国',code:'THA'},
    {id:194,name:'坦桑尼亚',code:'TZA'},
    {id:195,name:'汤加',code:'TON'},
    {id:196,name:'特克斯和凯克特斯群岛',code:'TCA'},
    {id:197,name:'特里斯坦达昆哈',code:'TAA'},
    {id:198,name:'特立尼达和多巴哥',code:'TTO'},
    {id:199,name:'突尼斯',code:'TUN'},
    {id:200,name:'图瓦卢',code:'TUV'},
    {id:201,name:'土耳其',code:'TUR'},
    {id:202,name:'土库曼斯坦',code:'TKM'},
    {id:203,name:'托克劳',code:'TKL'},
    {id:204,name:'瓦利斯和福图纳',code:'WLF'},
    {id:205,name:'瓦努阿图',code:'VUT'},
    {id:206,name:'危地马拉',code:'GTM'},
    {id:207,name:'维尔京群岛，美属',code:'VIR'},
    {id:208,name:'维尔京群岛，英属',code:'VGB'},
    {id:209,name:'委内瑞拉',code:'VEN'},
    {id:210,name:'文莱',code:'BRN'},
    {id:211,name:'乌干达',code:'UGA'},
    {id:212,name:'乌克兰',code:'UKR'},
    {id:213,name:'乌拉圭',code:'URY'},
    {id:214,name:'乌兹别克斯坦',code:'UZB'},
    {id:215,name:'西班牙',code:'ESP'},
    {id:216,name:'希腊',code:'GRC'},
    {id:217,name:'新加坡',code:'SGP'},
    {id:218,name:'新喀里多尼亚',code:'NCL'},
    {id:219,name:'新西兰',code:'NZL'},
    {id:220,name:'匈牙利',code:'HUN'},
    {id:221,name:'叙利亚',code:'SYR'},
    {id:222,name:'牙买加',code:'JAM'},
    {id:223,name:'亚美尼亚',code:'ARM'},
    {id:224,name:'也门',code:'YEM'},
    {id:225,name:'伊拉克',code:'IRQ'},
    {id:226,name:'伊朗',code:'IRN'},
    {id:227,name:'以色列',code:'ISR'},
    {id:228,name:'意大利',code:'ITA'},
    {id:229,name:'印度',code:'IND'},
    {id:230,name:'印度尼西亚',code:'IDN'},
    {id:231,name:'英国',code:'GBR'},
    {id:232,name:'英属印度洋领地',code:'IOT'},
    {id:233,name:'约旦',code:'JOR'},
    {id:234,name:'越南',code:'VNM'},
    {id:235,name:'赞比亚',code:'ZMB'},
    {id:236,name:'泽西岛',code:'JEY'},
    {id:237,name:'乍得',code:'TCD'},
    {id:238,name:'直布罗陀',code:'GIB'},
    {id:239,name:'智利',code:'CHL'},
    {id:240,name:'中非共和国',code:'CAF'}];
function fillCountrySelect(id) {
    $('#'+id).empty();
    $('#'+id).append('<option value="0">--选择国家--</option>');
    $.each(CountryDataAry, function (e, i) {
        $("#"+id).append('<option value="' + i.id + '">' + i.name + '</option>');
    });
}

function getCountryObj(id) {
    var obj='';
    $.each(CountryDataAry,function (index,iteam) {
        if (iteam.id==id){
            obj= iteam;
            return false;
        }
    });
    return obj;
}